Optimal. Leaf size=25 \[ \frac {i a (c-i c \tan (e+f x))^2}{2 f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 36, normalized size of antiderivative = 1.44, number of steps
used = 4, number of rules used = 4, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.138, Rules used = {3603, 3567,
3852, 8} \begin {gather*} \frac {a c^2 \tan (e+f x)}{f}-\frac {i a c^2 \sec ^2(e+f x)}{2 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3567
Rule 3603
Rule 3852
Rubi steps
\begin {align*} \int (a+i a \tan (e+f x)) (c-i c \tan (e+f x))^2 \, dx &=(a c) \int \sec ^2(e+f x) (c-i c \tan (e+f x)) \, dx\\ &=-\frac {i a c^2 \sec ^2(e+f x)}{2 f}+\left (a c^2\right ) \int \sec ^2(e+f x) \, dx\\ &=-\frac {i a c^2 \sec ^2(e+f x)}{2 f}-\frac {\left (a c^2\right ) \text {Subst}(\int 1 \, dx,x,-\tan (e+f x))}{f}\\ &=-\frac {i a c^2 \sec ^2(e+f x)}{2 f}+\frac {a c^2 \tan (e+f x)}{f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.16, size = 45, normalized size = 1.80 \begin {gather*} \frac {a c^2 \left (2 f x-2 \text {ArcTan}(\tan (e+f x))+2 \tan (e+f x)-i \tan ^2(e+f x)\right )}{2 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.07, size = 31, normalized size = 1.24
method | result | size |
risch | \(\frac {2 i a \,c^{2}}{f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{2}}\) | \(24\) |
derivativedivides | \(-\frac {i a \,c^{2} \left (\frac {\left (\tan ^{2}\left (f x +e \right )\right )}{2}+i \tan \left (f x +e \right )\right )}{f}\) | \(31\) |
default | \(-\frac {i a \,c^{2} \left (\frac {\left (\tan ^{2}\left (f x +e \right )\right )}{2}+i \tan \left (f x +e \right )\right )}{f}\) | \(31\) |
norman | \(\frac {a \,c^{2} \tan \left (f x +e \right )}{f}-\frac {i a \,c^{2} \left (\tan ^{2}\left (f x +e \right )\right )}{2 f}\) | \(34\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.55, size = 34, normalized size = 1.36 \begin {gather*} \frac {-i \, a c^{2} \tan \left (f x + e\right )^{2} + 2 \, a c^{2} \tan \left (f x + e\right )}{2 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 1.48, size = 35, normalized size = 1.40 \begin {gather*} \frac {2 i \, a c^{2}}{f e^{\left (4 i \, f x + 4 i \, e\right )} + 2 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 44 vs. \(2 (19) = 38\).
time = 0.12, size = 44, normalized size = 1.76 \begin {gather*} \frac {2 i a c^{2}}{f e^{4 i e} e^{4 i f x} + 2 f e^{2 i e} e^{2 i f x} + f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.50, size = 35, normalized size = 1.40 \begin {gather*} \frac {2 i \, a c^{2}}{f e^{\left (4 i \, f x + 4 i \, e\right )} + 2 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.54, size = 26, normalized size = 1.04 \begin {gather*} -\frac {a\,c^2\,\mathrm {tan}\left (e+f\,x\right )\,\left (-2+\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}{2\,f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________